<?php 

// ----------------------------- Field Spec settings are as below:	
//$employees_spec['<column>'] ['show'] = {'0' = notshown, '1' = show readonly, 'L' = show, use list (manual join), E = editable;
//$employees_spec['<column>'] ['key'] = {1 = key field, 0 of not (or dont include)};
//$employees_spec['<column>'] ['select'] = {'T' = text, 'D' = dropdown select, 'C' = checkbox (for 1 or 0 boolean), 'R' = radiogroup, 'A' = textarea, 'DT' = calendar for date-time};
//$employees_spec['<column>'] ['filter'] = {1 if value is filtered for, 0 or undefined if not};	
//$employees_spec['<column>'] ['add'] = {1 = include value as input in add box, 0 or undefined = do not };
//$employees_spec['<column>'] ['size'] = size of input field, or columns (cols) for textarea;
//$employees_spec['<column>'] ['rows'] = rows of textarea or listbox (future);
//$employees_spec['<column>'] ['headname'] = {Name to show on column heading or input heading};
//$employees_spec['<column>'] ['keyvalue'] = {array column to use for key in drop-down lists} ;
//For lists, Not needed if columns 'keyvalue' and 'showvalue' are used in array, no need to define these specs;
//$employees_spec['<column>'] ['showvalue'] = {array column to use for shown value in drop-down lists};
//$employees_spec['<column>'] ['rawformat']	= additional html to include inside the input field;
//$employees_spec['<column>'] ['image']	= image file name of image to associate with control (implemetned for calendar);
//$employees_spec['<column>'] ['showdateformat'] = format string for inital display of shown date, using php date formatters;
//$employees_spec['<column>'] ['cal'] ['ifFormat'] = format string of date from database (or whatever) for input to calendar, js date formatters;
//$employees_spec['<column>'] ['cal'] ['align'] = {'T1' Shows calendar above imput control (default), 'B1' shows it below controls};
//$employees_spec['<column>'] ['cal'] ['showsTime'] = {true = show time in calendar below date, false (Default) = show and use calendar for dates only};
//$employees_spec['<column>'] ['cal'] ['singleClick'] = {true = (Default) open calendar with single click, false = double click for calendar};
//$employees_spec['<column>'] ['allowhtml'] = {true:  do not escape html (to allow images, etc), false (or unset by default) escapes using htmlspecialchars)};
//$employees_spec['<column>']['source'] = table name for source table, will be appended to filters to resolve ambiguies with multiple tables
//$employees_spec['<column>']['makefunction'] = construct function - function to call to create the field from the data (defaults to the col_name, make_colname)


//---Note - for autoheadings, rows will be arranged in the order of these definition secitons for each column
	
if(($PAGETYPE == 'LIST') OR ($PAGETYPE == 'FORM') ){

}

//column settings for employeeNumber
$employees_spec['employeeNumber'] ['show'] = 1;
$employees_spec['employeeNumber'] ['key'] = 1;
$employees_spec['employeeNumber'] ['filter'] = 1;
$employees_spec['employeeNumber'] ['size'] = 20;
$employees_spec['employeeNumber'] ['rows'] = 1;

//column settings for lastName
$employees_spec['lastName'] ['show'] = 'E';
$employees_spec['lastName'] ['add'] = 1;
$employees_spec['lastName'] ['select'] = 'T';
$employees_spec['lastName'] ['filter'] = 1;
//$employees_spec['lastName'] ['filter'] = 1;
$employees_spec['lastName'] ['size'] = 20;
$employees_spec['lastName'] ['rows'] = 1;
$employees_spec['lastName'] ['makefunction'] = 'make_lastName';
$employees_spec['lastName'] ['allowhtml'] = 1;
$employees_spec['lastName'] ['sort'] = true;
$employees_spec['lastName'] ['showfilter'] = 1;

//column settings for firstName
$employees_spec['firstName'] ['show'] = 'E';
$employees_spec['firstName'] ['add'] = 1;
$employees_spec['firstName'] ['select'] = 'T';
$employees_spec['firstName'] ['filter'] = 1;
$employees_spec['firstName'] ['size'] = 20;
$employees_spec['firstName'] ['rows'] = 1;
$employees_spec['firstName'] ['showfilter'] = 1;

//column settings for extension
$employees_spec['extension'] ['show'] = 'E';
$employees_spec['extension'] ['add'] = 1;
$employees_spec['extension'] ['select'] = 'T';
$employees_spec['extension'] ['filter'] = 1;
$employees_spec['extension'] ['size'] = 20;
$employees_spec['extension'] ['rows'] = 1;

//column settings for email
$employees_spec['email'] ['show'] = 'E';
$employees_spec['email'] ['add'] = 1;
$employees_spec['email'] ['select'] = 'T';
$employees_spec['email'] ['filter'] = 1;
$employees_spec['email'] ['size'] = 20;
$employees_spec['email'] ['rows'] = 1;

//column settings for officeCode
$employees_spec['officeCode'] ['show'] = 'E';
$employees_spec['officeCode'] ['select'] = 'D';
$employees_spec['officeCode'] ['filter'] = 1;
$employees_spec['officeCode'] ['size'] = 10;
$employees_spec['officeCode'] ['rows'] = 1;
$employees_spec['officeCode'] ['list'] = array(0=>array('keyvalue'=>0,'showvalue'=>'none'));
$employees_spec['officeCode'] ['listquery'] = "SELECT officeCode AS keyvalue, city AS showvalue FROM offices WHERE 1 ";
$employees_spec['officeCode'] ['listqueryorder'] = array('city'=>'ASC');
$employees_spec['officeCode'] ['makefunction'] = "make_lookup_val";
$employees_spec['officeCode'] ['showfilter'] = 1;

//column settings for reportsTo
$employees_spec['reportsTo'] ['show'] = 'E';
$employees_spec['reportsTo'] ['select'] = 'D';
$employees_spec['reportsTo'] ['filter'] = 1;
$employees_spec['reportsTo'] ['size'] = 20;
$employees_spec['reportsTo'] ['rows'] = 1;

//column settings for jobTitle
$employees_spec['jobTitle'] ['show'] = 'E';
$employees_spec['jobTitle'] ['select'] = 'T';
$employees_spec['jobTitle'] ['filter'] = 1;
$employees_spec['jobTitle'] ['size'] = 20;
$employees_spec['jobTitle'] ['rows'] = 1;

//column settings for fulltime
$employees_spec['fulltime'] ['show'] = 'E';
$employees_spec['fulltime'] ['select'] = 'C';
$employees_spec['fulltime'] ['filter'] = 1;
$employees_spec['fulltime'] ['size'] = 20;
$employees_spec['fulltime'] ['rows'] = 1;
$employees_spec['fulltime'] ['showfilter'] = 1;

//column settings for hiredate
$employees_spec['hiredate'] ['show'] = 'E';
$employees_spec['hiredate'] ['select'] = 'CAL';
//$employees_spec['hiredate'] ['filter'] = 1;
$employees_spec['hiredate'] ['filter'] ['before']['op'] = '<';
$employees_spec['hiredate'] ['filter'] ['after']['op'] = '>=';
$employees_spec['hiredate'] ['filter'] ['after']['show'] = 1;
$employees_spec['hiredate'] ['size'] = 10;
$employees_spec['hiredate'] ['rows'] = 1;
$employees_spec['hiredate'] ['showfilter'] = true;

//column settings for delete
$employees_spec['edit'] ['show'] = 1;
$employees_spec['edit'] ['size'] = 20;
$employees_spec['edit'] ['rows'] = 1;
$employees_spec['edit'] ['makefunction'] = 'make_edit';

//column settings for delete
$employees_spec['delete'] ['show'] = 1;
$employees_spec['delete'] ['size'] = 20;
$employees_spec['delete'] ['rows'] = 1;
$employees_spec['delete'] ['makefunction'] = 'make_delete';


//column settings for Select
$employees_spec['Select'] ['show'] = 1;
$employees_spec['Select'] ['size'] = 20;
$employees_spec['Select'] ['rows'] = 1;
$employees_spec['Select'] ['makefunction'] = 'make_multiselectCB';

?>
